package com.hollysys.hollimsa.biz.istio.virtualservice.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author wangyuxi
 * @date 2020/10/14
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VirtualserviceDTO implements Serializable {

    private static final long serialVersionUID = 5000532973641429161L;
    @ApiModelProperty(value = "规则名称-符合正则表达式[a-z0-9]([-a-z0-9]*[a-z0-9])?",required = true)
    /** 规则名称 */
    private String ruleName;

    @ApiModelProperty(value = "访问方式 (public公网， cluster集群 )",required = true)
    /** 访问方式 (public公网， cluster集群 )*/
    private String requestType;

    @ApiModelProperty(value = "网关",required = true)
    private List<String> gateways;

    @ApiModelProperty(value = "路由类型(content基于请求内容, trafficRatio 基于流量比例)",required = true)
    private String routerType;

    @ApiModelProperty(value = "创建时间",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
}
